<h2>Create new parameter</h2>
<?php
echo CHtml::beginForm();
//echo CHtml::activeHiddenField($model, 'user_type');
?>

<div class="yiiForm">
	<div class="simple">
		<?php echo CHtml::activeLabel($model,'param_mnemonic'); ?>
		<?php echo CHtml::activeTextField($model,'param_mnemonic',array('size'=>65,'maxlength'=>100)); ?>
	</div>
	<div class="simple">
		<?php echo CHtml::activeLabel($model,'param_label'); ?>
		<?php echo CHtml::activeTextarea($model,'param_label',array('cols'=>50,'rows'=>4)); ?>
	</div>
	<div class="simple">
		<?php echo CHtml::activeLabel($model,'param_type'); ?><div class="clean">
		<?php

echo CHtml::activeRadioButtonList($model, 'param_type', array (
	'table' => Yii::t('parameter', 'table of parameters'),
	'list' => Yii::t('parameter', 'list of parameters')
));
?></div>
	</div>
	<div class="simple">
		<?php echo CHtml::activeLabel($model,'read_only'); ?>
		<?php echo CHtml::activeCheckBox($model, 'read_only'); ?>
	</div>
</div><!-- yiiForm -->

<?php

if ($model->param_type != "")
	echo $this->renderPartial('_'.$model->param_type, array (
		'parameter' => $model->parameter,
		'model' => $model,
		'update' => true
	));

?>

<br />
<div class="yiiForm">
<div class="action">
<?php echo CHtml::submitButton($update ? Yii::t('views','Save') : Yii::t('views','Create')); ?>
</div>

<?php echo CHtml::endForm(); ?>

</div><!-- yiiForm -->